package com.nbcio.iot.domain.bo;

import com.esotericsoftware.kryo.util.Null;
import com.nbcio.common.core.validate.AddGroup;
import com.nbcio.common.core.validate.EditGroup;
import com.nbcio.iot.domain.entity.IotDevice;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;


/**
 * 设备业务对象 iot_device
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = IotDevice.class, reverseConvertGenerate = true)
public class IotDeviceBo extends IotDevice {

    @NotNull(message = "设备ID不能为空", groups = { EditGroup.class })
    private Long deviceId;

    @NotBlank(message = "设备名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String deviceName;

    @NotBlank(message = "设备编码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String deviceCode;

    @NotNull(message = "产品ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long productId;

    private Long groupId;
} 